Say the code is in a single main.swift for a command-line tool, it ignores all arguments, & it solely calls a synchronous Swift function on macOS 10.13+ (no Swift 10.15+ Concurrency) that returns a [String] containing the results of the Spotlight query, which is printed to stdout. (I know how to print the results to stdout from a RunLoop, but my real uses need synchronous Spotlight results, so the synchronous requirement remains).
How can I write the aforementioned synchronous function?
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags: